-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set initial sim time from the command-line #3294
Set initial sim time from the command-line #3294
Conversation
Signed-off-by: Audrow Nash <audrow.j.nash@nasa.gov>
Signed-off-by: Audrow Nash <audrow.j.nash@nasa.gov>
I didn't realize that our |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than a few minor comments
gazebo/Server.cc
Outdated
@@ -194,6 +194,8 @@ bool Server::ParseArgs(int _argc, char **_argv) | |||
"Absolute path in which to store state data") | |||
("record_period", po::value<double>()->default_value(-1), | |||
"Recording period (seconds).") | |||
("initial_sim_time", po::value<double>(), | |||
"Initial simulation time (seconds).") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the order of these arguments determines the formatting of the help string, so I would move this out of the middle of the record_*
arguments to be next to iters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 5cc4db3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks; I pushed it one more line in 7f872b4
Signed-off-by: Audrow Nash <audrow.j.nash@nasa.gov>
Signed-off-by: Audrow Nash <audrow.j.nash@nasa.gov>
Signed-off-by: Audrow Nash <audrow.j.nash@nasa.gov>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll merge after reviewing the CI results
Expose gzserver CLI parameter added in gazebosim/gazebo-classic#3294. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Expose gzserver CLI parameter added in gazebosim/gazebo-classic#3294. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Expose gzserver CLI parameter added in gazebosim/gazebo-classic#3294. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Expose gzserver CLI parameter added in gazebosim/gazebo-classic#3294. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Shouldn't this PR also adjust the time that is set in gazebo-classic/gazebo/physics/World.cc Line 1456 in 17e09f5
|
This PR adds the
--initial_sim_time
flag togzserver
. If the flag and a value is not provided, the behavior is not changed. This works with large times, such as epoch time and floating point numbers (see the test).FYI @scpeters